package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;


/**
 * The persistent class for the expense_payment database table.
 * 
 */
@Entity
@Table(name="expense_payment")
@NamedQueries({
@NamedQuery(name="ExpensePayment.findAll", query="SELECT e FROM ExpensePayment e"),
@NamedQuery(name="ExpensePayment.deleteById", query="DELETE FROM ExpensePayment WHERE id = :P1")
})
public class ExpensePayment implements Serializable {

	private static final long serialVersionUID = -1317456136578911111L;

	@EmbeddedId
	private ExpensePaymentPK id;

	private String comments;

	//bi-directional many-to-one association to ExpenseCategory
    @MapsId("expenseCategoryId")
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name = "expense_category_id", referencedColumnName = "expense_category_id")
	private ExpenseCategory expenseCategory;

    //bi-directional many-to-one association to Payment
    @MapsId("paymentId")
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name = "payment_id", referencedColumnName = "payment_id")
	private Payment payment;

	public ExpensePaymentPK getId() {
		return this.id;
	}

	public void setId(ExpensePaymentPK id) {
		this.id = id;
	}

	public String getComments() {
		return this.comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public ExpenseCategory getExpenseCategory() {
		return this.expenseCategory;
	}

	public void setExpenseCategory(ExpenseCategory expenseCategory) {
		this.expenseCategory = expenseCategory;
	}

	public Payment getPayment() {
		return this.payment;
	}

	public void setPayment(Payment payment) {
		this.payment = payment;
	}

}